//
//  ElementCollectionViewCell.swift
//  beegin2
//
//  Created by zsy on 16/4/5.
//  Copyright © 2016年 kszz. All rights reserved.
//

import UIKit

enum elementLevel{

    case low,normal,high
}

class ElementCollectionViewCell: UICollectionViewCell {
    
    @IBOutlet weak var nameLabel: UILabel!
    @IBOutlet weak var backView: UIView!
    @IBOutlet weak var countLabel: UILabel!
    
    var level:elementLevel = .normal{
    
        didSet{
        
            switch level {
            case .low:
                backView.backgroundColor = UIColor(red: 255 / 255, green: 206 / 255, blue: 84 / 255, alpha: 255 / 255)
            case .normal:
                backView.backgroundColor = UIColor(red: 160 / 255, green: 212 / 255, blue: 104 / 255, alpha: 255 / 255)
            case .high:
                backView.backgroundColor = UIColor(red: 252 / 255, green: 110 / 255, blue: 80 / 255, alpha: 255 / 255)
            }
        }
    }
}
